package com.open.center.jwt.model;

import java.util.LinkedHashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

/**
 * 用户
 *
 * @author Riche's
 * @since 2025/5/23
 */
@Data
public class JwtUser {

    private String userId;

    private String username;

    private String realName;

    private boolean isAuthenticated = false;

    @JsonIgnore
    private final Map<String, Object> any = new LinkedHashMap<>();

    @JsonAnyGetter
    public Map<String, Object> getter() {
        return any;
    }

    @JsonAnySetter
    public void setter(String key, Object value) {
        any.put(key, value);
    }
}
